package cn.findviewbydream.evil.main.entity

import java.io.Serializable
import java.util.*

/********************************************
 * 工程名：MealOrder
 * 包名：cn.findviewbydream.evil.main.entity
 * 时间：16-12-21
 * 作者：白雨濃 evil
 * 邮箱：evilbai@foxmail.com
 * 内容：订单实体
 ********************************************/
class OrderEntity : Serializable
{
    var orderId = 0/*订单id*/
    var seatId: BaseSeatEntity? = null/*座位号*/
    var total = 0/*总计价格*/
    var actualTotal: Int? = null/*实际收取价格*/
    var waiter: EmployeeEntity? = null/*负责该订单的服务员*/
    var active = false/*是否活动*/
    var createDateTime: Date? = null/*创建时间*/
    var overDateTime: Date? = null/*完成时间*/
    var remark: String? = null
    var orderItemList: List<OrderItemEntity>? = null

    constructor()
    constructor(orderId: Int, seatId: BaseSeatEntity?, total: Int, actualTotal: Int?, waiter: EmployeeEntity?,
                active: Boolean, createDateTime: Date?, overDateTime: Date?, remark: String?,
                orderItemList: List<OrderItemEntity>?)
    {
        this.orderId = orderId
        this.seatId = seatId
        this.total = total
        this.actualTotal = actualTotal
        this.waiter = waiter
        this.active = active
        this.createDateTime = createDateTime
        this.overDateTime = overDateTime
        this.remark = remark
        this.orderItemList = orderItemList
    }

    override fun toString(): String
    {
        return "OrderEntity(orderId=$orderId, seatId=$seatId, total=$total, actualTotal=$actualTotal, waiter=$waiter, active=$active, createDateTime=$createDateTime, overDateTime=$overDateTime, remark=$remark, orderItemList=$orderItemList)"
    }
}